<body class="layui-layout-body">
    <style>
        .dropdown-menu .dropdown-menu-nav {
            display: none;
        }
    </style>
    <div id="LAY_app">
        <div class="layui-layout layui-layout-admin">
            <div class="layui-header">
                <!-- 头部区域 -->
                <ul class="layui-nav layui-layout-left">
                    <li class="layui-nav-item layadmin-flexible" lay-unselect>
                        <a href="javascript:;" layadmin-event="flexible" title="侧边伸缩">
                            <i class="layui-icon layui-icon-shrink-right" id="LAY_app_flexible"></i>
                        </a>
                    </li>
                    <li class="layui-nav-item" lay-unselect>
                        <a href="javascript:;" layadmin-event="refresh" title="刷新">
                            <i class="layui-icon layui-icon-refresh-3"></i>
                        </a>
                    </li>
                    <li class="layui-nav-item" lay-unselect>
                        <a href="javascript:;">
                            <cite>{$Think.session.schoolInfo.name}</cite>
                        </a>
                        <dl class="layui-nav-child">
                            {foreach $schooInfo as $key=>$vo }
                            <dd><a lay-id="{$key}" class="school" href="javascript:;">{$vo.name}</a></dd></a></dd>
                            {/foreach}
                        </dl>
                    </li>
                </ul>
                <ul class="layui-nav layui-layout-right" lay-filter="layadmin-layout-right">

                    <li class="layui-nav-item dropdown-menu" lay-unselect>
                        <a layadmin-event="message" lay-text="控制台">
                            <i class="layui-icon layui-icon-console"></i>
                        </a>
                        <div class="dropdown-menu-nav dropdown-bottom-right"
                            style="width: 280px;padding: 0 10px 10px 10px;">
                            <div class="dropdown-anchor"></div>
                            <div class="layadmin-shortcut">
                                <ul class="layui-row layui-col-space10">
                                    <li class="layui-col-xs6">
                                        <a href="https://mp.uxuj.cn/admin/index/system" target="_blank">
                                            <i class="layui-icon layui-icon-console"></i>
                                            <cite>控制台</cite>
                                        </a>
                                    </li>
                                    <li class="layui-col-xs6">
                                        <a href="https://mp.uxuj.cn/admin" target="_blank">
                                            <i class="layui-icon layui-icon-console"></i>
                                            <cite>基础数据</cite>
                                        </a>
                                    </li>
                                    <li class="layui-col-xs6">
                                        <a href="https://test.classc.cn" target="_blank">
                                            <i class="layui-icon layui-icon-chart"></i>
                                            <cite>电子班牌</cite>
                                        </a>
                                    </li>
                                    <li class="layui-col-xs6">
                                        <a href="javascript:;">
                                            <i class="layui-icon layui-icon-template-1"></i>
                                            <cite>德育评价</cite>
                                        </a>
                                    </li>
                                    <li class="layui-col-xs6">
                                        <a href="javascript:;">
                                            <i class="layui-icon layui-icon-chat"></i>
                                            <cite>宿管系统</cite>
                                        </a>
                                    </li>
                                    <li class="layui-col-xs6">
                                        <a href="javascript:;">
                                            <i class="layui-icon layui-icon-find-fill"></i>
                                            <cite>教师评价</cite>
                                        </a>
                                    </li>
                                </ul>

                            </div>
                        </div>
                    </li>
                    <li class="layui-nav-item layui-hide-xs">
                        <a href="javascript:;">更新缓存</a>
                        <dl class="layui-nav-child">
                            <!-- 二级菜单 -->
                            <dd>
                                <a onclick="clearCache(1)">清除所有数据</a>
                            </dd>
                            <dd>
                                <a onclick="clearCache(2)">清除缓存文件</a>
                            </dd>
                            <dd>
                                <a onclick="clearCache(3)">清除缓存数据</a>
                            </dd>
                        </dl>
                    </li>
                    <li class="layui-nav-item layui-hide-xs" lay-unselect>
                        <a href="javascript:;" layadmin-event="theme">
                            <i class="layui-icon layui-icon-theme"></i>
                        </a>
                    </li>
                    <li class="layui-nav-item layui-hide-xs" lay-unselect>
                        <a href="javascript:;" layadmin-event="note">
                            <i class="layui-icon layui-icon-note"></i>
                        </a>
                    </li>
                    <li class="layui-nav-item layui-hide-xs" lay-unselect>
                        <a href="javascript:;" layadmin-event="fullscreen">
                            <i class="layui-icon layui-icon-screen-full"></i>
                        </a>
                    </li>
                    <li class="layui-nav-item" lay-unselect>
                        <a href="javascript:;">
                            <cite>您好，{$Think.session.admin.username}</cite>
                        </a>
                        <dl class="layui-nav-child">
                            <!--                        <dd><a lay-href="set/user/info.html">基本资料</a></dd>-->
                            <!--                        <dd><a lay-href="set/user/password.html">修改密码</a></dd>-->
                            <!--                        <hr>-->
                            <dd onclick="outLogin()" style="text-align: center;"><a>退出</a></dd>
                        </dl>
                    </li>

                    <li class="layui-nav-item layui-hide-xs" lay-unselect>
                        <a href="javascript:;" class="rightDrawer"><i
                                class="layui-icon layui-icon-more-vertical"></i></a>
                    </li>
                    <li class="layui-nav-item layui-show-xs-inline-block layui-hide-sm" lay-unselect>
                        <a href="javascript:;" layadmin-event="more"><i
                                class="layui-icon layui-icon-more-vertical"></i></a>
                    </li>
                </ul>
            </div>

            <!-- 侧边菜单 -->
            {include file="public/menu" /}

            <!-- 页面标签 -->
            <div class="layadmin-pagetabs" id="LAY_app_tabs">
                <div class="layui-icon layadmin-tabs-control layui-icon-prev" layadmin-event="leftPage"></div>
                <div class="layui-icon layadmin-tabs-control layui-icon-next" layadmin-event="rightPage"></div>
                <div class="layui-icon layadmin-tabs-control layui-icon-down">
                    <ul class="layui-nav layadmin-tabs-select" lay-filter="layadmin-pagetabs-nav">
                        <li class="layui-nav-item" lay-unselect>
                            <a href="javascript:;"></a>
                            <dl class="layui-nav-child layui-anim-fadein">
                                <dd layadmin-event="closeThisTabs"><a href="javascript:;">关闭当前标签页</a></dd>
                                <dd layadmin-event="closeOtherTabs"><a href="javascript:;">关闭其它标签页</a></dd>
                                <dd layadmin-event="closeAllTabs"><a href="javascript:;">关闭全部标签页</a></dd>
                            </dl>
                        </li>
                    </ul>
                </div>
                <div class="layui-tab" lay-unauto lay-allowClose="true" lay-filter="layadmin-layout-tabs">
                    <ul class="layui-tab-title" id="LAY_app_tabsheader">
                        <li lay-id="home/console.html" lay-attr="home/console.html" class="layui-this"><i
                                class="layui-icon layui-icon-home"></i></li>
                    </ul>
                </div>
            </div>


            <!-- 主体内容 -->
            <div class="layui-body" id="LAY_app_body">
                <div class="layadmin-tabsbody-item layui-show">
                    <iframe src="{:url('bancard/index/welcome')}" frameborder="0" class="layadmin-iframe"></iframe>
                </div>
            </div>
            <!-- 辅助元素，一般用于移动设备下遮罩 -->
            <div class="layadmin-body-shade" layadmin-event="shade"></div>
        </div>
    </div>
</body>

</html>
<script>
    var layerFrameConfig = {
        w: $(window).width(),
        h: $(window).height()
    };
    $(window).resize(function () {
        layerFrameConfig.w = $(window).width()
        layerFrameConfig.h = $(window).height()
    });
    function changeLang(type) {
        $.post("{:url('bancard/Common/lang')}", { type: type }, function (res) {
            if (res.status == 1) {
                layer.msg("设置成功", { time: 500, icon: 1 }, function () {
                    parent.location.reload()
                })

            } else {
                layer.msg("设置失败")
            }
        })
    }
    function clearCache(type) {
        $.post("{:url('bancard/Common/clearCache')}", { type: type }, function (res) {
            if (res.status == 1) {
                layer.msg(res.message, { time: 500, icon: 1 }, function () {
                    parent.location.reload()
                })
            } else {
                layer.msg(res.message)
            }
        })
    }
    function outLogin() {
        $.post("{:url('bancard/Common/outLogin')}", {}, function (res) {
            if (res.status == 0) {
                layer.msg(res.message, { time: 500, icon: 1 }, function () {
                    location.href = "https://mp.uxuj.cn/"
                })
            } else {
                layer.msg(res.message)
                location.href = "https://mp.uxuj.cn/"
            }
        })
    }
    layui.config({
        base: '__STATIC__/layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index',
        dropdown:'dropdown/dropdown',
    }).use(['index', 'element','dropdown'], function () {
        var $ = layui.$;
        var element = layui.element;
        var dropdown = layui.dropdown;
        //一些事件监听
        $(".school").click(function () {
            var id = $(this).attr("lay-id")
            if (id != undefined) {
                $.post("{:url('bancard/Common/setschool')}", { index: id }, function (res) {
                    if (res.status == 1) {
                        layer.msg(res.message, { time: 500, icon: 1 }, function () {
                            parent.location.reload()
                        })
                    } else {
                        layer.msg(res.message)
                    }
                })
            }
        })
        // $(".rightDrawer").click(function () {
        //     layer.open({
        //         type: 2,
        //         anim: -1,
        //         title: false,
        //         closeBtn: false,
        //         offset: 'r',
        //         shade: 0.1,
        //         shadeClose: true,
        //         skin: 'layui-anim layui-anim-rl layui-layer-adminRight',
        //         area: '80%',
        //         content:"{:url('bancard/News/index')}"
        //     })
        // })
    });
</script>